// 引入英文语言包
import type { App } from 'vue';
import enUS from 'vant/es/locale/lang/en-US';
import 'vant/es/toast/style';
import 'vant/es/dialog/style';
import 'vant/es/notify/style';
import 'vant/es/image-preview/style';
import {
    allowMultipleToast,
    Badge,
    Button,
    Circle,
    ConfigProvider,
    DropdownItem,
    DropdownMenu,
    Field,
    Form,
    Icon,
    Image as VanImage,
    Lazyload,
    Locale,
    Popup,
    PullRefresh,
    Skeleton,
    Stepper,
    Sticky,
    Tab,
    Tabs,
} from 'vant';

Locale.use('en-US', enUS);
allowMultipleToast();

const VantInstall = (app: App): void => {
    app.use(Badge)
        .use(Button)
        .use(Circle)
        .use(ConfigProvider)
        .use(DropdownItem)
        .use(DropdownMenu)
        .use(Field)
        .use(Form)
        .use(Icon)
        .use(Lazyload)
        .use(VanImage)
        .use(Popup)
        .use(PullRefresh)
        .use(Skeleton)
        .use(Stepper)
        .use(Sticky)
        .use(Tab)
        .use(Tabs);
};

export default VantInstall;
